import request from '@/utils/request'

//  *********企业新增*********
/**   接口名称目录              功能
     
**/
//list
export  const  listDepart = (search)=>
	request({
		url:'/op/office/get_office_list',
		method:'get',
		params: {
            
        }  
	})
// 新增 部门
export  const  submitAddDepart = (url,form)=>
	request({
		url,
		method:'post',
		data: JSON.stringify(
            form
        )  
	})
//删除 部门
export  const  delDepart = (code)=>
	request({
		url:'/op/office/delete_office',
		method:'get',
		params: {
			code
		} 
	})
	
//获取角色列表
export  const  RoleList = (search)=>
	request({
		url:'/sys/role/get_role_list',
		method:'get',
		params: {
            
        }  
	})
	
// 新增 部门
export  const  submitAddUser = (url,form)=>
	request({
		url,
		method:'post',
		data: JSON.stringify(
            form
        )  
	})
//获取用户列表_系统用户	
export  const  listUser_of_system = (search)=>
	request({
		url:'/sys/user/get_user_list',
		method:'get',
		params: {
            pageNo:search.current,
            pageSize:search.pageSize,
            roleCode:'a4b72945-4c53-47bc-bc5c-59e933bb193e', 
        }  
	})
//获取用户列表_企业用户	
export  const  listUser_of_ent = (search)=>
	request({
		url:'/sys/user/get_user_list',
		method:'get',
		params: {
            pageNo:search.pageNo,
            pageSize:search.pageSize,
            roleCode:'e5c3cfa4-4508-469a-8dc6-0841c86ce44c', 
            entCode:search.entCode
        }  
	})
//获取用户列表_内部用户	
export  const  listUser_of_inner = (search)=>
	request({
		url:'/sys/user/get_user_list',
		method:'get',
		params: {
            pageNo:search.pageNo,
            pageSize:search.pageSize,
            roleCode:'a9b8b8d0-93f0-4c43-8412-8ff0a95df35c', 
            entCode:search.entCode
        }  
	})
//获取指定的用户	
export  const  UserDetail = (code)=>
	request({
		url:'/sys/user/get_user',
		method:'get',
		params: {
            code
        }  
	})

//删除 用户	
export  const  delUser = (code)=>
	request({
		url:'/sys/user/delete_user',
		method:'get',
		params: {
			code
		} 
	})

export  const  optionUser = (url,code)=>
	request({
		url,
		method:'get',
		params: {
			code
		} 
	})
//option
export  const  RoleInit = (search)=>
	request({
		url:'/sys/role/get_role_list',//获取角色列表
		method:'get',
		params: {
			pageNo:search.pageNo,
			pageSize:search.pageSize
		} 
	})

export  const  submitAddRole = (url,form)=>
	request({
		url,
		method:'post',
		data: JSON.stringify(
            form
        )  
	})
	
	
export  const  RoleDetail = (code)=>
	request({
		url:'/sys/role/get_role',//获取指定的角色
		method:'get',
		params: {
			code
		} 
	})
	
export  const  delRole = (code)=>
	request({
		url:'/sys/role/delete_role',//删除 角色
		method:'get',
		params: {
			code
		} 
	})
	
export  const  journalList = (search)=>
	request({
		url:'/op/log/get_log_list',//获取日志列表
		method:'get',
		params: {
			pageNo:search.pageNo,
			pageSize:search.pageSize
		}  
	})

//获取意向客户联系信息列表	
export  const  customer_of_oliaviaList = (search)=>
	request({
		url:'/op/intention_contact/get_intention_contact_list',
		method:'get',
		params: {
			pageNo:search.pageNo,
			pageSize:search.pageSize
		}  
	})

// 获取指定的意向客户联系信息
export const getDetail_of_customerMsg = (code)=>
	request({
		url:'/op/intention_contact/get_intention_contact',
		method:'get',
		params:{
			code
		}
	})